package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Id       int    `gorm:"column:id;primary_key;AUTO_INCREMENT" json:"id"`
	Phone    string `gorm:"column:phone" json:"phone"`
	Password string `gorm:"column:password" json:"password"`
	NickName string `gorm:"column:nick_name" json:"nickName"`
	Icon     string `gorm:"column:icon" json:"icon"`
}
type UserVo struct {
	gorm.Model
	Id         int    `gorm:"column:id;primary_key;AUTO_INCREMENT" json:"id"`
	Phone      string `gorm:"column:phone" json:"phone"`
	Password   string `gorm:"column:password" json:"password"`
	NickName   string `gorm:"column:nick_name" json:"nickName"`
	Icon       string `gorm:"column:icon" json:"icon"`
	CreateTime MyTime `gorm:"column:created_at" json:"createTime"`
	UpdateTime MyTime `gorm:"column:updated_at" json:"updateTime"`
}
type UserDto struct {
	gorm.Model
	Id       int    `gorm:"column:id;primary_key;AUTO_INCREMENT" json:"id"`
	NickName string `gorm:"column:nick_name" json:"nickName"`
	Icon     string `gorm:"column:icon" json:"icon"`
}

func (User) TableName() string {
	return "tb_user"
}
func (UserVo) TableName() string {
	return "tb_user"
}
